package com.jkm.service;

import com.jkm.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import javax.naming.Name;
import java.util.List;

/**
 * Created by 四声草 on 2018/3/27.
 */
@CacheConfig(cacheNames = "user")
public interface UserService {

    int save(User user);

    @Cacheable("selectById")
    User selectById(Integer id);

    List<User> selectAll();
}
